/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package deatax.mode;

import deatax.GameData;
import deatax.Player;
import java.util.ArrayList;

/**
 *
 * @author Pieman
 */
public class EliminationGameMode extends GameMode {

    public EliminationGameMode(GameData data) {
        super(data);
        this.desc = "Elimination. Play until only one player is left.";
        this.reqs = new String[0];
        this.reqv = new String[0];
    }

    @Override
    public ArrayList<Player> getResultOrder() {
        ArrayList<Player> order = new ArrayList<Player>();
        order.add(data.getRoster().getPlayers().get(0));
        ArrayList<Player> losers = data.getRoster().getLosers();
        for (int i = losers.size() - 1; i >= 0; --i) {
            order.add(losers.get(i));
        }
        return order;
    }
    
}
